<?php
/* @var $this BannerController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'Banners',
);

$this->menu=array(
	array('label'=>'Create Banner', 'url'=>array('create')),
	array('label'=>'Manage Banner', 'url'=>array('admin')),
);
?>
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
    <ul class="breadcrumb">
        <li><i class="ace-icon fa fa-home home-icon"></i><a href="<?=$this->createUrl('default/index')?>">首页</a></li>
        <li><a href="<?=$this->createUrl('banner/index')?>">Banner类型</a></li>
        <li class="active">Banner类型列表</li>
    </ul><!-- /.breadcrumb -->
    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                <i class="ace-icon fa fa-search nav-search-icon"></i>
            </span>
        </form>
    </div><!-- /.nav-search -->
</div><!-- /.breadcrumbs -->
<div class="page-content">
    <div class="page-header">
        <h1>Banner类型
            <small><i class="ace-icon fa fa-angle-double-right"></i> Banner Type</small>
            <small>
                <a href="<?=$this->createUrl('banner/create')?>" class="btn btn-xs"><i class="fa fa-plus"></i> 创建</a>
                <a href="<?=$this->createUrl('banner/delete')?>" class="btn btn-xs" title="删除" data-pjax="0" data-confirm="真的要删除吗？"><i class="fa fa-trash-o"></i> 删除</a>
            </small>
        </h1>

    </div><!-- /.page-header -->
    <div class="row">
        <div class="col-xs-12">

            <!-- PAGE CONTENT BEGINS -->
            <div class="row">
                <div class="col-xs-12">
                    <table id="simple-table" class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th class="center" width="20"><label class="pos-rel"><input type="checkbox" class="ace" name="selection_all" id="selection_all" /><span class="lbl"></span></label></th>
                            <th width="150">名称</th>
                            <th width="">描述</th>
                            <th width="105">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php foreach ($list as $key=>$data){?>
                            <tr>
                                <td class="center"><label class="pos-rel"><input type="checkbox" class="ace" name="selection[]" value="<?=$data->id?>"/><span class="lbl"></span></label></td>
                                <td><?php echo CHtml::encode($data->name); ?></td>
                                <td><?php echo CHtml::encode($data->tips); ?></td>
                                <td>
                                    <div class="hidden-sm hidden-xs btn-group">
                                        <a href="<?=$this->createUrl('banners',array('id'=>$data->id))?>" title="列表" class="btn btn-xs btn-success"><i class="ace-icon fa fa-share bigger-120"></i></a>
                                        <a href="<?=$this->createUrl('update',array('id'=>$data->id))?>" title="编辑" class="btn btn-xs btn-info"><i class="ace-icon fa fa-pencil bigger-120"></i></a>
                                        <a href="<?=$this->createUrl('delete',array('id'=>$data->id))?>" title="删除" class="btn btn-xs btn-danger"><i class="ace-icon fa fa-trash-o bigger-120"></i></a>
                                    </div>
                                </td>
                            </tr>
                        <?php }?>
                        </tbody>
                    </table>
                    <div class="pagination-xs">
                        <div class="pull-left">
                            共 <?=$count?> 条数据
                        </div>
                        <div class="pull-right">
                            <?php $this->widget('CLinkPager', array(
                                    'pages' => $pages,
                                    'selectedPageCssClass' => 'active', //当前页的class
                                    'hiddenPageCssClass' => 'disabled', //禁用页的class
                                    'header' => '', //分页前显示的内容
                                    'maxButtonCount' => 10, //显示分页数量
                                    'htmlOptions' => array('class' => 'pagination','style'=>'margin:0;'),
                                    'firstPageLabel' => '首页',
                                    'nextPageLabel' => '下一页',
                                    'prevPageLabel' => '上一页',
                                    'lastPageLabel' => '末页',
                                )
                            );?>
                        </div>
                    </div>
                </div><!-- /.span -->
            </div><!-- /.row -->

            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->

